package com.power.sifa.std.model;

import com.plf.core.common.domain.BaseModel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

/**
*  行政管理单位关联赣政通人员表实体类
*/

@Entity
@ApiModel(value="行政管理单位关联赣政通人员表")
@Data
@Table(name="Std_admuser",schema="sfapprove")
@NoArgsConstructor
@EqualsAndHashCode(callSuper = false)
//@IdClass(Std_admuser.Std_admuserPK.class) 用于复合组件
public class Std_admuser extends BaseModel implements Serializable {
	
	private static final long serialVersionUID = 1L;
	
    @Id
    @Setter(AccessLevel.NONE)
    @ApiModelProperty(value = "序号")
    private String id;

    @ApiModelProperty(value = "关联表id")
    private String admunitid;

    @ApiModelProperty(value = "赣政通人员id")
    private String userid;

    @ApiModelProperty(value = "赣政通人员名称")
    private String username;

    @ApiModelProperty(value = "赣政通组织机构id")
    private String unitid;

    @ApiModelProperty(value = "赣政通人员手机号码")
    private String mobile;


    @ApiModelProperty(value = "联系人收件地址")
    private String address;


    public Map<String, Object> parseMap() {
        Map<String, Object> map=new HashMap<>();
        map.put("id", this.getId());
        map.put("admunitid", this.getAdmunitid());
        map.put("userid", this.getUserid());
        map.put("username", this.getUsername());
        map.put("unitid", this.getUnitid());
        map.put("mobile", this.getMobile());
        return map;
    }

    public String getId() {
        return id;
    }

    public void setId(Serializable id) {
        this.id = (String) id;
    }

    public Serializable getPrimaryKey() {
        return id;
        // return new Std_admuserPK(id, id2); 用于复合主键，请手动创建内部静态类
    }

    public void setPrimaryKey(Serializable key) {
        this.id = (String)key;

        //Std_admuserPK pk = (Std_admuserPK) key; 用于复合主键
        //this.id = pk.getId();
        //this.id2 = pk.getId2();
    }

}